package com.fenxiangtech.mall.model;

import java.math.BigDecimal;
import java.util.Date;

public class Product {
    //
    private Long id;
    //商品名称
    private String name;
    //价格,单位：分
    private BigDecimal price;
    //库存量
    private Long stock;
    //
    private Long categoryId;
    //主图ID号，这是一个反范式设计，有一定的冗余
    private String mainImgUrl;
    //创建时间
    private Date createTime;
    //
    private Date updateTime;
    //摘要
    private String summary;
    //详情
    private String detail;

    public Long getId() {
        return id;
    }

    public Product setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public Product setName(String name) {
        this.name = name;
        return this;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public Product setPrice(BigDecimal price) {
        this.price = price;
        return this;
    }

    public Long getStock() {
        return stock;
    }

    public Product setStock(Long stock) {
        this.stock = stock;
        return this;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public Product setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
        return this;
    }

    public String getMainImgUrl() {
        return mainImgUrl;
    }

    public Product setMainImgUrl(String mainImgUrl) {
        this.mainImgUrl = mainImgUrl;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public Product setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public Product setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public String getSummary() {
        return summary;
    }

    public Product setSummary(String summary) {
        this.summary = summary;
        return this;
    }

    public String getDetail() {
        return detail;
    }

    public Product setDetail(String detail) {
        this.detail = detail;
        return this;
    }
}
